<?php
/**
 * Definition of an XML tag.
 *
 * @author  Stephan Schmidt <stephan.schmidt@schlund.de>
 * @author  Frank Kleine <frank.kleine@schlund.de>
 */
XJConfLoader::load('definitions.TagDefinition');
/**
 * Definition of an XML tag.
 *
 * @package     XJConf
 * @subpackage  definitions
 */
class ConcreteTagDefinition extends TagDefinition
{
    /**
     * Create a new tag definition
     *
     * @param   string  $name  name of the tag
     * @param   string  $type  type of the tag
     * @throws  InvalidTagDefinitionException
     */
	public function __construct($name, $type)
	{
		if (null == $name || strlen($name) == 0) {
			throw new InvalidTagDefinitionException('TagDefinition needs a name.');
		}
		if (null == $type || strlen($type) == 0) {
			throw new InvalidTagDefinitionException('TagDefinition needs a type.');
		}

		$this->name    = $name;
		$this->tagName = $name;
		$this->setType($type);
	}
}
?>